package test;

//找出连续最长的数字串
import java.util.Scanner;
public class topic12 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int max = 0;
        int tempMax = 0;
        char[] chars = str.toCharArray();
        String end = "";
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < str.length(); i++) {
            if (Character.isDigit(chars[i])){
                tempMax ++;
                sb.append(chars[i]);
            }else {
                tempMax = 0;
                sb.delete(0,sb.length());
            }
            if (max < tempMax){
                max = tempMax;
                end = sb.toString();
            }
        }
        System.out.println(end);
    }
}
